﻿@model PagedList.StaticPagedList<Guan.CMS.Web.ViewModels.Article.ArticleSummaryViewModel>
@using Guan.CMS.Common.Framework
@using PagedList.Mvc
@section Styles
{
    <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/PagedList.css")" />
}
<div class="content_resize">
    <div class="mainbar">
        @if (Model.Any())
        {
            foreach (var articleDto in Model)
            {
                <div class="article blog">
                    <h2>@Html.ActionLink(articleDto.Title.CutString(20), "Detail", "News", new {id = articleDto.Id}, new{title=articleDto.Title,target="_blank"})</h2>
                    <p class="timebox">
                        <span class="day">@articleDto.UpdatedTime.Day</span> <span class="month">@(articleDto.UpdatedTime.ToString("yyyy/MM"))</span>
                    </p>
                    @*<p class="ainfo">
                        <span>阅读@(articleDto.Hits)</span> $1$<span>评论13</span>#1#</p>*@
                    <div class="adetail fn-clear">
                        <p>
                            @if (!string.IsNullOrWhiteSpace(articleDto.FirstImage)) { 
                                <img src="@(articleDto.FirstImage)" width="202" height="147" alt="@(articleDto.Title)" class="f1" />
                            }
                            @articleDto.BodyText.CutString(200)
                        </p>
                    </div>
                    <p>@Html.ActionLink("查看详细>>", "Detail", "News", new { id = articleDto.Id }, new { title = articleDto.Title, target = "_blank" })</p>
                </div>
            }
        }
        else
        {
            <p>暂无新闻！</p>
        }
        <div class="paging">
            @Html.PagedListPager(Model,page => Url.Action("Index",new{page=page}))
        </div>
    </div>
    <div class="sidebar">
        @*<div class="gadget">
            <h2 class="star">
                阅读排行</h2>
            <div class="clr">
            </div>
            <ul class="sb_menu">
                <li><a href="#">新闻1</a></li>
                <li><a href="#">新闻1新闻1</a></li>
                <li><a href="#">新闻1新闻1 新闻1</a></li>
                <li><a href="#">新闻1</a></li>
                <li><a href="#">新闻1新闻1新闻1新闻1</a></li>
                <li><a href="#" title="Website Templates">新闻1s</a></li>
            </ul>
        </div>*@
        @Html.Partial("_RightSliderContact")
    </div>
    <div class="clr">
    </div>
</div>